package com.rla.runner;

import com.rla.mqListener.PsiRedisPushPopListener;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * 初始化 system 模块对应业务数据
 *
 * @author qc
 */
@Slf4j
@RequiredArgsConstructor
@Component
public class MallApplicationRunner implements ApplicationRunner {

    private final PsiRedisPushPopListener redisPushPopListener;


    @Override
    public void run(ApplicationArguments args) throws Exception {
        log.info("运行在线订单监听~~~~~~~~~~~~~");
        //7天订单自动完成确认收货
        redisPushPopListener.autoComplete();
    }

}
